package com.bmob.im.demo.adapter;

import java.util.List;

import android.annotation.SuppressLint;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
import cn.bmob.v3.datatype.BmobGeoPoint;

import com.bmob.im.demo.CustomApplcation;
import com.bmob.im.demo.R;
import com.bmob.im.demo.adapter.base.BaseListAdapter;
import com.bmob.im.demo.adapter.base.ViewHolder;
import com.bmob.im.demo.bean.Storage;
import com.bmob.im.demo.bean.User;
import com.bmob.im.demo.util.ImageLoadOptions;
import com.bmob.im.demo.util.TimeUtil;
import com.nostra13.universalimageloader.core.ImageLoader;

public class StorageAdapter extends BaseListAdapter<Storage>{

	public StorageAdapter(Context context, List<Storage> list) {
		super(context, list);
		// TODO Auto-generated constructor stub
	}

	@SuppressLint("InflateParams")
	@Override
	public View bindView(int position, View convertView, ViewGroup parent) {
		if (convertView == null) {
			convertView = mInflater.inflate(R.layout.item_lover_storage, null);
		}
		Storage storage = getList().get(position);
		TextView tv_message = ViewHolder.get(convertView, R.id.tv_storageMessage);
		TextView tv_nickName = ViewHolder.get(convertView, R.id.tv_nickName);
		TextView tv_time = ViewHolder.get(convertView, R.id.tv_time);
		tv_nickName.setText(storage.getNick());
		tv_message.setText(storage.getMessage());
		tv_time.setText(storage.getCreatedAt());
		return convertView;
	}

}
